<?php
session_cache_expire(120);
session_start();
ob_start();
include("function.php");
condb();
if($_SESSION['login']==true){header("location:./");exit;}
if($_POST['op']=='login'){
	$m_username=$_POST['m_username'];
	$m_password=$_POST['m_password'];
	$res=mysql_query("select * from member where m_username='$m_username' and m_password='$m_password' and status_id=1") or die(mysql_error());
	if(mysql_num_rows($res)==1){
		$row=mysql_fetch_assoc($res);
		$_SESSION['m_id']=$row['m_id'];
		$_SESSION['m_name']=$row['m_name'];
		$_SESSION['group_id']=$row['group_id'];
		$_SESSION['branch_id']=$row['branch_id'];
	}
	header("location:./");exit;
}
?>